Replication File for "#Asylum: How Syrian Refugees Engage with Online Information" Journal of Quantitative Description, forthcoming.

By Alexandra A. Siegel, Jessica Wolff, and Jeremy Weinstein 


** Notes **

Last run by authors on macOS Monterey v 12.1
Rstudio verison 2023.06.0+421 
Running R version 4.3.0 

Working Directory will be automatically be set to location of "Refugee_Info_Replication" folder when code files are run. 

We do not provide the raw text of social media posts used to produce the figures and tables because platform terms of service prevent sharing the raw data and there are ethical concerns due to the vulnerability of the refugee population under study. When datasets are at the post level, we include post ids to allow other researchers to replicate our analyses. Page IDs are also made available in the Appendix to rehydrate the full Facebook dataset. 


** Citation **

Alexandra A. Siegel, Jessica Wolff, and Jeremy Weinstein. 2024. "#Asylum: How Syrian Refugees Engage with Online Information.” The Journal of Quantitative Description, forthcoming.

@article{Siegel_Wolff_Weinstein2024,
author = {Siegel, Alexandra A. and Jessica Wolff and Jeremy Weinstein},
journal = {The Journal of Quantitative Description},
title = {{#Asylum: How Syrian Refugees Engage with Online Information}},
volume = {(forthcoming)},
year = {2024}
}


** Input Data **

 (in the "data" subdirectory)
 
1. posts.csv
-- Post-level data for descriptive statistics and dictionary-based analysis 

2. comments.csv 
-- Comment-level data for descriptive statistics 

3. metadata.csv
-- Page metadata for descriptive statistics 

4. monthly_tone.csv
-- Monthly measure of tone based on month-level ALC embeddings.

5. post_tone.csv
-- Post-level measure of tone based on document-level ALC embeddings. Note this data is limited to posts that contain target migration keywords. 


6. topic_gpt_validation.csv 
-- 1000 randomly sampled posts per topic, classified as relevant to each topic or not using the gpt-3.5-turbo model 

7. tone_gpt_validation.csv
-- Post-level classified data (encouraging, discouraging, or neutral) using gpt-3.5-turbo model. Note data is limited to posts that are at least 100 characters long.

** Code Files **

 (In the "code" subdirectory) 

If R files are run, they will generate the figures and tables and save figures in the the "plots" subdirectory.

1. descriptive_statistics.R
-- Produces all descriptive statistics in manuscript (Figure 1a, Figure 1b, Table 1, and Table A2)

2. source_analysis.R
-- Produces volume and engagement analyses by source (Figure 2a, Figure 2b, Figure 3a, Figure 3b, Figure 3c) 

3. topic_analysis.R
-- Produces dictionary-based topic analyses (Figure 4a, Figure 4b, Figure 5, Figure 6, Figure A2, Figure A8, Figure A9) 

4. tone_analysis.R
-- Produces ALC-based tone analyses (Figure 7a, Figure 7b, Figure 8, Figure 9) 

5. topic_validation.R
-- Produces gpt-3.5-turbo validation Figure for topic analysis (Figure A3)

6. tone_validation.R
-- Replicates tone analysis using gpt-3.5-turbo classified data (Figure A4, Figure A5, Figure A6, Figure A7)
 



